package com.itheima.stock.mapper;

import com.itheima.stock.common.domain.OuterMarketDomain;
import com.itheima.stock.pojo.StockOuterMarketIndexInfo;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
* @author 呱呱
* @description 针对表【stock_outer_market_index_info(外盘详情信息表)】的数据库操作Mapper
* @createDate 2022-05-30 15:45:59
* @Entity com.itheima.stock.pojo.StockOuterMarketIndexInfo
*/
public interface StockOuterMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockOuterMarketIndexInfo record);

    int insertSelective(StockOuterMarketIndexInfo record);

    StockOuterMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockOuterMarketIndexInfo record);

    int updateByPrimaryKey(StockOuterMarketIndexInfo record);

    /**
     * 查询国外大盘数据信息
     *
     * @param lastDate 过去日子
     * @param outers   外
     * @return {@link List}<{@link OuterMarketDomain}>
     */
    List<OuterMarketDomain> getOuterMarketInfosByCodesAndTime(@Param("time") Date lastDate,
                                                              @Param("codes") List<String> outers,
                                                              @Param("num") Integer num);
    /**
     * 外盘数据插入
     */
    void insertBatch(@Param("list") ArrayList<StockOuterMarketIndexInfo> list);




}
